<h2>Edit Article</h2>
<% form_for :article, 
            :url => {:controller=>'articles1',:action=>'update',:id=>@article.id}, 
            :html => { :method => :put } do |f| -%>
  <p>Title:<br /><%= f.text_field :title, :size => 60 %></p>
  <p>Synopsis:<br /><%= f.text_area :synopsis, :rows => 8, :cols => 90 %></p>
  <p>Body:<br /><%= f.text_area :body, :rows => 40, :cols => 90 %></p>
  <p>Image Url:<br /><%= f.text_field :imageurl, :size => 80 %></p>  
  <p>Category:<br />
    <%= f.collection_select :category_id, 
          Category.find(:all,:conditions=>['websitesinf_id = ?',Websitesinf.find_by_iscurrent(true).id]), :id, :name, :include_blank => true %></p>
     <% if logged_in_user.has_role?('administrator')%>        
  <p>Published? <%= f.check_box :published %></p>
    <%end%>
  <%= submit_tag 'Save' %> or <%= link_to 'cancel', {:controller=>'articles1',:action=>'admin'} %>
<% end -%>
